#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>

using namespace std;

string multiply(string num1, string num2) {
    int m = num1.size();
    int n = num2.size();
    vector<int> tmp(m + n - 1, 0);
    reverse(num1.begin(), num1.end());
    reverse(num2.begin(), num2.end());

    for (int i = 0; i < m; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            tmp[i + j] += (num1[i] - '0') * (num2[j] - '0');
        }
    }

    string ret;
    int c = 0;
    for (int i = 0; i < tmp.size(); ++i)
    {
        int t = tmp[i] + c;
        c = t / 10;
        t %= 10;
        ret += (t + '0');
    }
    if (c)
        ret += (c + '0');

    while (ret.back() == '0' && ret.size() != 1)
        ret.pop_back();

    reverse(ret.begin(), ret.end());
    return ret;
}

int main()
{
    multiply("123" , "0");
	return 0;
}